package com.z2wenfa.zxingdemo2;


import android.graphics.Bitmap;
import android.view.View;
import android.widget.Toast;

import com.google.zxing.Result;

import cn.itguy.zxingportrait.CaptureActivity;
import cn.itguy.zxingportrait.camera.CameraManager;

public class MainActivity extends CaptureActivity {

    @Override
    public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) {
        super.handleDecode(rawResult, barcode, scaleFactor);
        Toast.makeText(this, rawResult.getText(), Toast.LENGTH_SHORT).show();
        restartPreviewAfterDelay(0l);
    }


    @Override
    protected View initWantedAddView() {

        return null;
    }


    @Override
    protected CameraManager.FramingRectResizeHelper initFramingRectResizeHelper() {
        return new CameraManager.FramingRectResizeHelper(0.7f, 0.3f);
    }
}
